package com.baidu.push.example;

import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

import com.baidu.android.pushservice.PushManager;
import com.chinatelecom.epush.R;


public class TestActivity extends Activity{
	private EditText setTag;
	private Button button;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.settag_layout);
		
		setTag = (EditText)findViewById(R.id.setTag);
		button = (Button)findViewById(R.id.setTagButton);
		
		button.setOnClickListener(new ButtonOnclick());
	}
	
	class ButtonOnclick implements OnClickListener{
		@Override
		public void onClick(View v) {
			List<String> tags = Utils.getTagsList(setTag.getText().toString());
			PushManager.setTags(getApplicationContext(), tags);
		}
	}
	
}

